#include  "Visitor.h"

class Exp
{
public:
    virtual void accept(Visitor&v) = 0;
};

class AddExp : public Exp
{
public:
    Exp* rhs;
    Exp* lhs;
    AddExp(Exp* lhs, Exp* rhs) : lhs(lhs), rhs(rhs) {}
    virtual void accept(Visitor&v) override final;
};

class IntExp : public Exp
{
public:
    int value;
    IntExp(int value) : value(value) {}
    virtual void accept(Visitor&v) override final;
};
